package com.yy.test;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;

import com.alibaba.fastjson.JSON;
import com.ibm.icu.math.BigDecimal;
import com.yy.Mylog;
import com.yy.syncZsws;

import CustomClassFile.CronJob.DateUtil;
import CustomClassFile.CronJob.MyJob;
import CustomClassFile.CronJob.MyQuartzManager;
import CustomClassFile.CronJob.SyncZswsShift;
import CustomClassFile.CronJob.TestMSG;
import CustomClassFile.CronJob.SyncZswsShiftType;
import CustomClassFile.yueli.Jiaban;
import CustomClassFile.yueli.KaoqinDk;
import CustomClassFile.yueli.KaoqinDk_Sanban;
import CustomClassFile.yueli.Yueli;
import weaver.conn.RecordSet;
import weaver.general.GCONST;
import weaver.general.Util;

public class MyTest2 {
	public static final Log logger = LogFactory.getLog(Yueli.class);

	@Before
	public void before() {
		GCONST.setRootPath("WebContent/");
		GCONST.setServerName("ecology");
	}

	@Test
	public void test1() {
		//com.yy.syncZsws.test5();
		//MyJob job=new MyJob();
		//TestMSG.getSendMsg("2018-11-01");
		//logger.info(job.selectbeforeDK("card1", "2018-10-31"));
		//TestMSG.getSendMsg("2018-10-20");
		//Map<String ,Object> map=new HashMap<>();
		//MyQuartzManager.addJob("test", MyJob.class, new Date(), map, 1);
		//logger.info(TestMSG.getSendMsg("2018-11-03"));
		//logger.info(KaoqinDk.getDayPb("178", "2018-11-03"));
		//int i=Util.getIntValue(null);
		//System.out.println(i);
		//logger.info(Jiaban.selectRecord(5, "", 1, 10));
		//System.out.println(BigDecimal.TEN.toString());
		//logger.info(KaoqinDk.getTimeDifference("08:00", "05:10"));
//		KaoqinDk.insertDaKa("4", "2018-11-08", "05:10", null, null, null, null, null, null, null, null, null, null, null, null, null,  null, "JiaBan",null, "card1", null, null);
//		KaoqinDk.insertDaKa("4", "2018-11-08", "12:10", null, null, null, null, null, null, null, null, null, null, null, null, null,  null, "JiaBan",null, "card2", null, null);
//		KaoqinDk.insertDaKa("4", "2018-11-08", "13:10", null, null, null, null, null, null, null, null, null, null, null, null, null,  null, "JiaBan",null, "card3", null, null);
//		KaoqinDk.insertDaKa("4", "2018-11-08", "18:10", null, null, null, null, null, null, null, null, null, null, null, null, null,  null, "JiaBan",null, "card4", null, null);
//		
		//syncZsws.test5();
//		List<Map<String ,Object>> mapinfo= Yueli.getMonthPb("236", "2018-10-01");
//		String mapjson=JSON.toJSONString(mapinfo);
		System.out.println(Yueli.getPaiBanDays("4","2018-11-13"));
//		SyncZswsShift s=new SyncZswsShift();
//		s.execute();
//		SyncZswsShiftType st=new SyncZswsShiftType();
//		st.execute();
//		Map<String,Object> map=KaoqinDk_Sanban.getDayshowDK("4","2018-11-12 12:11");
//		//System.out.println(JSON.toJSONString(map));
//		System.out.println(JSON.parseObject(JSON.toJSONString(map)));
//		System.out.println(Mylog.getLog());
//		System.out.println(Mylog.getLog());
//		System.out.println(Mylog.getLog());
//		System.out.println(Mylog.getLog());
		
	}
	
	public static void main(String[] args) throws InterruptedException {
		GCONST.setRootPath("WebContent/");
		GCONST.setServerName("ecology");
		TestMSG.sendMsgNotice();
		Map<String ,Object> map=new HashMap<>();
		map.put("content", "tst");
		List<String> f=new ArrayList<String>();
		f.add("3");
		f.add("4");
		f.add("5");
		map.put("userlist",f );
		map.put("date","2018-10-31");
		map.put("card","card3");
		Date date=DateUtil.currentDateCalculate(1);
		System.out.println(DateUtil.dateString(date));
		MyQuartzManager.addJob("test111", MyJob.class,date, map, 1);
		
//		Thread.sleep(2000*60);
//		MyQuartzManager.addJob("test111", MyJob.class, new Date(), map, 1);
	}
}
